home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ADA Programming Guide
/
ADA Programming Guide.iso
/
ada_a9x
/
z.ada
< prev
next >
Wrap
Text File
|
1996-01-30
|
600b
|
38 lines
-- Test program 8
-- 4/12/1994
WITH Ada.Text_IO; USE Ada.Text_IO;
PROCEDURE Z IS
TASK TYPE T IS
ENTRY E1(C : Character);
END T;
TASK BODY T IS
My_C : Character;
BEGIN
ACCEPT E1(C : Character) DO
My_C := C;
Put("Task ");
Put(My_C);
Put_Line(" is running.");
END E1;
FOR I IN 1 .. 3 LOOP
DELAY 0.01;
Put(My_C);
END LOOP;
New_Line;
END T;
BEGIN
Put_Line("Main Initiating.");
DECLARE
T1, T2, T3, T4 : T;
BEGIN
T1.E1('a');
T2.E1('b');
T3.E1('c');
T4.E1('d');
END;
New_Line;
Put_Line("Main Terminating.");
END Z;